Skip to content

Conversation

ndgrigorian
Copy link
Collaborator

@ndgrigorian ndgrigorian commented Nov 6, 2023

This pull request proposes implementing dpctl.tensor.__array_namespace_info__, an inspection utility coming soon to the array API specification.

In addition, this PR adds an __array_api_version__ attribute as per the specification and experimentally removes the --ci flag from array API testing.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

This inspection utility is coming to the array API specification in the near future
@github-actions
Copy link

github-actions bot commented Nov 6, 2023

@coveralls
Copy link
Collaborator

coveralls commented Nov 6, 2023

Coverage Status

coverage: 85.811% (+0.02%) from 85.794%
when pulling 412692a on array-api-inspection-utilities
into f686102 on master.

@github-actions
Copy link

github-actions bot commented Nov 6, 2023

Array API standard conformance tests for dpctl=0.15.1dev1=py310ha25a700_4 ran successfully.
Passed: 1006
Failed: 66
Skipped: 50

Comment on lines 117 to 198
def devices(self):
return dpctl.get_devices()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible to run in an environment where CUDA device is available, but dpctl was not compiled to offload to NVidia GPUs.

Perhaps we should thin this list by ensuring that we can create an dpt.arange for this device and cache that list.

It does not need to be done in this PR though

@github-actions
Copy link

github-actions bot commented Nov 7, 2023

Array API standard conformance tests for dpctl=0.15.1dev1=py310ha25a700_6 ran successfully.
Passed: 1005
Failed: 67
Skipped: 50

@ndgrigorian ndgrigorian marked this pull request as ready for review November 7, 2023 21:02
@oleksandr-pavlyk
Copy link
Contributor

The __array_namespace_info__ class would benefit from a docstring, even if concise.

Disallows dtypes for `kind` kwarg in __array_namespace_info__().dtypes

Removes  `float16` from dtypes listed by __array_namespace_info__ as per spec

Permits dpctl.tensor.Device objects in device keyword arguments in array API inspection utilities
@ndgrigorian ndgrigorian force-pushed the array-api-inspection-utilities branch from 13a4262 to 412692a Compare November 8, 2023 09:35
@github-actions
Copy link

github-actions bot commented Nov 8, 2023

Array API standard conformance tests for dpctl=0.15.1dev1=py310ha25a700_16 ran successfully.
Passed: 1006
Failed: 66
Skipped: 50

Copy link
Contributor

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ndgrigorian

@ndgrigorian ndgrigorian merged commit f2af753 into master Nov 8, 2023
@ndgrigorian ndgrigorian deleted the array-api-inspection-utilities branch November 8, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants